package com.beesphere.excel.writer.style.resolvers;

import java.lang.reflect.Method;

import com.beesphere.excel.writer.impls.WorkbookContext;

public class BooleanResolver extends MethodBasedStyleResolver {

	private static final long serialVersionUID = 1481698918294061508L;
	
	private static final String TRUE = "true";

	public BooleanResolver (Method method) {
		super (method);
	}
	
	@Override
	protected Object getValue (WorkbookContext workbookContext, Object applyTo, Object value) {
		return (String.valueOf(value)).trim().equals (TRUE);
	}

}